import pandas as pd
from kan_module.KAN_model import train_and_eval_kan
import torch
from sklearn.model_selection import train_test_split
import numpy as np
from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error, max_error
from kan_module.KAN_model import MultKAN

# 1. 读取数据
data = pd.read_csv('data.csv', sep='\t')

# 2. 计算dt特征
data['dt'] = data['t_hf_wetbulb'] - data['outlet_water_temp']

# 3. 自动选择设备
device = 'cuda' if torch.cuda.is_available() else 'cpu'

# 4. 调用KAN回归
model, y_pred_kan = train_and_eval_kan(data, epochs=4000, hidden=5, lr=0.01, device=device)
